package com.kingstar.ceres.entity.secondary;


import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Tolerate;

import java.util.Date;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * XBOND成交行情表
 *
 * @author 傻男人
 * @since 2022-03-30
 */

@Data
@ToString(callSuper = true)
@TableName(value = "k_cmds_xbond_market_deal")
@Builder
public class KCmdsXbondMarketDeal implements Serializable {

    private static final long serialVersionUID = 1L;

    @Tolerate
    public KCmdsXbondMarketDeal() {
    }

    /**
     * 债券代码
     */
	@TableField("security_id")
	private String securityId;
    /**
     * 债券名称
     */
	private String symbol;
    /**
     * 报文生成时间
     */
	@TableField("transact_time")
	private String transactTime;
    /**
     * 市场标识
     */
	@TableField("market_indicator")
	private String marketIndicator;
    /**
     * 是否上市前债券
     */
	@TableField("pre_market_bond_indicator")
	private String preMarketBondIndicator;
    /**
     * 行情类型
     */
	@TableField("md_type")
	private String mdType;
    /**
     * 详细行情类型
     */
	@TableField("md_sub_type")
	private String mdSubType;
    /**
     * 交易方式
     */
	@TableField("trade_method")
	private String tradeMethod;
    /**
     * 最新成交净价
     */
	@TableField("up_to_date_price")
	private BigDecimal upToDatePrice;
    /**
     * 清算速度
     */
	@TableField("settl_type")
	private String settlType;
    /**
     * 最新成交方向
     */
	@TableField("fill_side")
	private String fillSide;
    /**
     * 最新成交到期收益率
     */
	@TableField("up_to_date_yield")
	private BigDecimal upToDateYield;
    /**
     * 最高成交净价
     */
	@TableField("highest_price")
	private BigDecimal highestPrice;
    /**
     * 最高成交到期收益率
     */
	@TableField("highest_yield")
	private BigDecimal highestYield;
    /**
     * 最低成交净价
     */
	@TableField("lowest_price")
	private BigDecimal lowestPrice;
    /**
     * 最低成交到期收益率
     */
	@TableField("lowest_yield")
	private BigDecimal lowestYield;
    /**
     * 开盘价
     */
	@TableField("opening_valence")
	private BigDecimal openingValence;
    /**
     * 开盘净价
     */
	@TableField("opening_price")
	private BigDecimal openingPrice;
    /**
     * 开盘到期收益率
     */
	@TableField("opening_yield")
	private BigDecimal openingYield;
    /**
     * 前开盘净价
     */
	@TableField("before_opening_price")
	private BigDecimal beforeOpeningPrice;
    /**
     * 前开盘到期收益率
     */
	@TableField("before_opening_yield")
	private BigDecimal beforeOpeningYield;
    /**
     * 加权平均净价
     */
	@TableField("weighted_average_price")
	private BigDecimal weightedAveragePrice;
    /**
     * 加权平均到期收益率
     */
	@TableField("weighted_average_yield")
	private BigDecimal weightedAverageYield;
    /**
     * 前加权平均净价
     */
	@TableField("before_weighted_average_price")
	private BigDecimal beforeWeightedAveragePrice;
    /**
     * 前加权平均到期收益率
     */
	@TableField("before_weighted_average_yield")
	private BigDecimal beforeWeightedAverageYield;
    /**
     * 前收盘净价
     */
	@TableField("before_closing_price")
	private BigDecimal beforeClosingPrice;
    /**
     * 前收盘到期收益率
     */
	@TableField("before_closing_yield")
	private BigDecimal beforeClosingYield;
    /**
     * 净价涨跌幅
     */
	@TableField("price_rise_fall_amplitude")
	private BigDecimal priceRiseFallAmplitude;
    /**
     * 收益率涨跌
     */
	@TableField("yield_rise_fall")
	private BigDecimal yieldRiseFall;
    /**
     * 成交数
     */
	@TableField("transaction_number")
	private Long transactionNumber;
    /**
     * 来源
     */
	@TableField("message_source")
	private String messageSource;
    /**
     * 创建时间
     */
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private Long createTime;
    /**
     * 成交日期
     */
	@TableField("trade_date")
	private String tradeDate;
    /**
     * 成交时间
     */
	@TableField("trade_time")
	private String tradeTime;
    /**
     * 成交时间（时间戳）
     */
	@TableField("quotation_time")
	private Long quotationTime;

	public class Meta {
        public static final String SECURITY_ID = "security_id";
        public static final String SYMBOL = "symbol";
        public static final String TRANSACT_TIME = "transact_time";
        public static final String MARKET_INDICATOR = "market_indicator";
        public static final String PRE_MARKET_BOND_INDICATOR = "pre_market_bond_indicator";
        public static final String MD_TYPE = "md_type";
        public static final String MD_SUB_TYPE = "md_sub_type";
        public static final String TRADE_METHOD = "trade_method";
        public static final String UP_TO_DATE_PRICE = "up_to_date_price";
        public static final String SETTL_TYPE = "settl_type";
        public static final String FILL_SIDE = "fill_side";
        public static final String UP_TO_DATE_YIELD = "up_to_date_yield";
        public static final String HIGHEST_PRICE = "highest_price";
        public static final String HIGHEST_YIELD = "highest_yield";
        public static final String LOWEST_PRICE = "lowest_price";
        public static final String LOWEST_YIELD = "lowest_yield";
        public static final String OPENING_VALENCE = "opening_valence";
        public static final String OPENING_PRICE = "opening_price";
        public static final String OPENING_YIELD = "opening_yield";
        public static final String BEFORE_OPENING_PRICE = "before_opening_price";
        public static final String BEFORE_OPENING_YIELD = "before_opening_yield";
        public static final String WEIGHTED_AVERAGE_PRICE = "weighted_average_price";
        public static final String WEIGHTED_AVERAGE_YIELD = "weighted_average_yield";
        public static final String BEFORE_WEIGHTED_AVERAGE_PRICE = "before_weighted_average_price";
        public static final String BEFORE_WEIGHTED_AVERAGE_YIELD = "before_weighted_average_yield";
        public static final String BEFORE_CLOSING_PRICE = "before_closing_price";
        public static final String BEFORE_CLOSING_YIELD = "before_closing_yield";
        public static final String PRICE_RISE_FALL_AMPLITUDE = "price_rise_fall_amplitude";
        public static final String YIELD_RISE_FALL = "yield_rise_fall";
        public static final String TRANSACTION_NUMBER = "transaction_number";
        public static final String MESSAGE_SOURCE = "message_source";
        public static final String CREATE_TIME = "create_time";
        public static final String TRADE_DATE = "trade_date";
        public static final String TRADE_TIME = "trade_time";
        public static final String QUOTATION_TIME = "quotation_time";
    }
}